import request from '@/utils/request'

export function getApi(query) {
  return request({
    url: '/api/index',
    method: 'get',
    params: query
  })
}

export function addApi(query) {
  return request({
    url: '/api/save',
    method: 'post',
    params: query
  })
}

export function updateApi(query) {
  return request({
    url: `/api/edit`,
    method: 'post',
    params: query
  })
}

export function deleteApi(query) {
  return request({
    url: `/api/delete`,
    method: 'post',
    params: query
  })
}
